home *** CD-ROM | disk | FTP | other *** search
- package swings
- {
- import flash.display.*;
- import flash.events.*;
- import flash.net.*;
- import flash.utils.Timer;
-
- public class TitleScript extends MovieClip
- {
-
-
- public var startButton:SimpleButton;
-
- public var sharer:MovieClip;
-
- public var logo:MainLogo;
-
- public function TitleScript()
- {
- var _loc1_:* = undefined;
- super();
- if(SwingsGame(parent).pastDate)
- {
- logo.gotoAndStop(2);
- }
- else
- {
- logo.gotoAndStop(1);
- }
- trace("RET: " + SwingsGame(parent).returnTo);
- if(SwingsGame(parent).returnTo == null)
- {
- if(SwingsGame(parent).playMusic)
- {
- SwingsGame(parent).playAudio("myNameIs");
- _loc1_ = new Timer(2000,1);
- _loc1_.addEventListener("timer",playLoop);
- _loc1_.start();
- }
- }
- startButton.addEventListener(MouseEvent.MOUSE_DOWN,startGame);
- sharer.shareBtn.addEventListener(MouseEvent.MOUSE_DOWN,gotoShare);
- sharer.helpBtn.addEventListener(MouseEvent.MOUSE_DOWN,gotoHelp);
- SwingsGame(parent).returnTo = "title";
- }
-
- private function gotoShare(param1:MouseEvent) : *
- {
- sharer.shareBtn.removeEventListener(MouseEvent.MOUSE_DOWN,gotoShare);
- sharer.helpBtn.removeEventListener(MouseEvent.MOUSE_DOWN,gotoHelp);
- SwingsGame(parent).fade("share");
- }
-
- private function gotoHelp(param1:MouseEvent) : *
- {
- sharer.helpBtn.removeEventListener(MouseEvent.MOUSE_DOWN,gotoHelp);
- sharer.shareBtn.removeEventListener(MouseEvent.MOUSE_DOWN,gotoShare);
- SwingsGame(parent).fade("help1");
- }
-
- public function startGame(param1:MouseEvent) : *
- {
- startButton.removeEventListener(MouseEvent.MOUSE_DOWN,startGame);
- SwingsGame(parent).fade("help1");
- }
-
- public function playLoop(param1:TimerEvent) : *
- {
- if(SwingsGame(parent).playMusic)
- {
- SwingsGame(parent).playAudio("idleLoop",100,0,0,0.2);
- }
- }
- }
- }
-